// This program illustrates the use of Strings and IF/ELSE Statements

import java.io.*;
import java.lang.*;

public class string2
{ 
String first;
String middle;
String last;

  public static void main(String Jim[]) throws Exception
   {
	string2 myName = new string2();
	String hisName = new String("James R.Smith") ;
	String herName = "Mae L.Smith";
	String theirName = hisName + " " + herName;
	
	myName.first = "James ";
	myName.middle = "R.";
	myName.last = "Smith";
      	System.out.print(myName.first);
	System.out.print(myName.middle);
	System.out.println(myName.last);
	System.out.println(hisName);
	System.out.println(herName);
 	System.out.println();
	System.out.println(theirName);
	
       if(hisName.equals(herName))
	 System.out.println(hisName);
	else System.out.println(herName);
	 
   }
} 

